-- GENERATED SPELL FOR [Syndicate Conjuror] --


function spell0_2590(pUnit, Event) --@Bright Campfire,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(25085,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_2590', 1, 1)
end

function spell1_2590(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2590', 3000, 1)
end

function spell2_2590(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(15970,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2590', 11000, 1)
end

function spell3_2590(pUnit, Event) --@Summon Voidwalker,Self--
pUnit:FullCastSpellOnTarget(43896,pUnit)
pUnit:RegisterEvent('Sorts_2590', 599, 1)
end

function Sorts_2590(pUnit, Event)
local choix_sorts_2590 = math.random(0, 3)
if choix_sorts_2590 == 0 then
pUnit:RegisterEvent('spell0_2590', 1, 1)
end
if choix_sorts_2590 == 1 then
pUnit:RegisterEvent('spell1_2590', 1, 1)
end
if choix_sorts_2590 == 2 then
pUnit:RegisterEvent('spell2_2590', 1, 1)
end
if choix_sorts_2590 == 3 then
pUnit:RegisterEvent('spell3_2590', 1, 1)
end
end

function mob2590_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2590', math.random(1500, 3000), 1)
end

function mob2590_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2590_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2590_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2590, 1, 'mob2590_Action')
RegisterUnitEvent(2590, 2, 'mob2590_Leave')
RegisterUnitEvent(2590, 3, 'mob2590_Kill')
RegisterUnitEvent(2590, 4, 'mob2590_Die')
